package com.example.imiaow.yyads_text.splash;

import android.app.Activity;
import android.content.Context;

import io.flutter.Log;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.StandardMessageCodec;
import io.flutter.plugin.platform.PlatformView;
import io.flutter.plugin.platform.PlatformViewFactory;

public class SplashFactor extends PlatformViewFactory {
    private final BinaryMessenger binaryMessenger;
    private final Activity mactivity;

    public SplashFactor(BinaryMessenger binaryMessenger,Activity activity) {
        super(StandardMessageCodec.INSTANCE);
        this.binaryMessenger = binaryMessenger;
        this.mactivity = activity;
    }


    @Override
    public PlatformView create(Context context, int viewId, Object args) {
        Splash splash = new Splash(context, mactivity,binaryMessenger,viewId);
        splash.init();
        return splash;
    }
}
